#ifndef __METUX_H__
#define __METUX_H__

#include <pthread.h>

//pthread_cond_t cond_sqlite;  //数据库线程
//pthread_cond_t cond_analysis;
extern pthread_cond_t cond_uart_cmd;        //写串口条件变量
extern pthread_cond_t cond_client_request;  //下行数据解析主线程
//pthread_cond_t cond_infrared;		 
extern pthread_cond_t cond_buzzer;			//A9蜂鸣器线程条件变量
extern pthread_cond_t cond_led;			//A9LED线程条件变量
extern pthread_cond_t cond_camera;		//A9摄像头条件变量
extern pthread_cond_t cond_uart;			//串口读写条件变量，读完发信号给写
extern pthread_cond_t cond_sms;            //信息线程锁
extern pthread_cond_t cond_m0_over_ctl;    //M0环境变量超过上限报警线程条件变量
extern pthread_cond_t cond_led;     //LED控制模块被唤醒条件变量

extern pthread_mutex_t mutex_uart_cmd;			//写zigbee串口锁
extern pthread_mutex_t mutex_client_request;	//下行数据解析主线程锁
//pthread_mutex_t mutex_infrared;			
extern pthread_mutex_t mutex_buzzer;            //A9板蜂鸣器线程
extern pthread_mutex_t mutex_led;				 //A9板LED线程
extern pthread_mutex_t mutex_camera;			 //A9板相机线程
extern pthread_mutex_t mutex_uart;           	//zigbee串口读写锁
extern pthread_mutex_t recvdata_lock;         //共享内存线程锁
extern pthread_mutex_t mutex_m0_over_ctl;		   //判断环境信息是否超多上限控制线程锁
extern pthread_mutex_t mutex_led;          	//A9LED控制线程互斥锁
pthread_mutex_t mutex_limit;            //环境变量限定线程锁


void mutex_init(void);
void mutex_destory(void);




#endif
